<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:70:"D:\wamp\www\shop\public/../application/madmin\view\Config\showAdd.html";i:1548402720;s:71:"D:\wamp\www\shop\public/../application/madmin\view\Public\showBase.html";i:1547543098;}*/ ?>
<!DOCTYPE HTML>
<html>
	<head>
		<title>后台管理</title>
	    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	    <meta charset="UTF-8" />
	    <link rel="icon" type="image/ico" href="__IMG__/favicon.ico" />
	    <link type="text/css" rel="stylesheet" href="__CSS__/vendor/bootstrap/bootstrap.min.css" />
	    <link type="text/css" rel="stylesheet" href="__CSS__/content.css" />
		<link type="text/css" rel="stylesheet" href="__CSS__/vendor/font-awesome.css" />
		<link type="text/css" rel="stylesheet" href="__CSS__/vendor/bootstrap-checkbox.css" />
		<link type="text/css" rel="stylesheet" href="__JS__/vendor/chosen/css/chosen.min.css" />
		<link type="text/css" rel="stylesheet" href="__JS__/vendor/chosen/css/chosen-bootstrap.css" />
		<link type="text/css" rel="stylesheet" href="__CSS__/nicescroll.css" />
        <link type="text/css" rel="stylesheet" href="__CSS__/adapt.css" />
        <link type="text/css" rel="stylesheet" href="__CSS__/pagination.css" />
        <link type="text/css" rel="stylesheet" href="__CSS__/buttons.css" />
		<script type="text/javascript" src="__JS__/jquery-3.3.1.min.js"></script>
		<script type="text/javascript" src="__JS__/vendor/layer/layer.js"></script>
		<script type="text/javascript" src="__JS__/vendor/bootstrap/bootstrap.min.js"></script>
		<script type="text/javascript" src="__JS__/vendor/nicescroll/jquery.nicescroll.min.js"></script>
		<script type="text/javascript" src="__JS__/vendor/chosen/chosen.jquery.min.js"></script>
		<script type="text/javascript" src="__JS__/content.js"></script>
	</head>
	<body class="no-bg">
		<div id="wrap">
	        <div class="row">
	            <div id="content" class="col-md-12">
	            	
<div class="main">
    <div class="row">
        <div class="col-md-12">
            <section class="tile color transparent-black">
                <div class="tile-header bg-transparent-black-2">
                    <h1>
                        <?php if($Info == ''): ?>
                            <?php echo lang('XtPzXz'); else: ?>
                            <?php echo lang('XtPzGx'); endif; ?>
                    </h1>
                    <div class="controls">
                        <a href="javascript:void(0);" onclick="window.history.back();"><i class="fa fa-arrow-left"></i></a>
                        <?php if($Info == ''): ?>
                            <a href="<?php echo url('Config/showAdd'); ?>"><i class="fa fa-refresh"></i></a>
                        <?php else: ?>
                            <a href="<?php echo url('Config/showEdit', array('id'=>$Info['config_id'])); ?>"><i class="fa fa-refresh"></i></a>
                        <?php endif; ?>
                    </div>
                </div>
                <div class="tile-body nopadding">
                    <form class="FormTable" action="" method="post">
                        <div class="tile-body">
                            <div class="row">
                                <div class="form-group col-sm-12">
                                    <label><?php echo lang('XtPzFz'); ?></label>
                                    <select class="chosen-select chosen-transparent form-control" name="config_group">
                                        <?php if(!(empty($Group) || (($Group instanceof \think\Collection || $Group instanceof \think\Paginator ) && $Group->isEmpty()))): if(is_array($Group) || $Group instanceof \think\Collection || $Group instanceof \think\Paginator): $i = 0; $__LIST__ = $Group;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                                                <option value="<?php echo $vo['content_value']; ?>" <?php if($Info['config_group'] == $vo['content_value']): ?>selected<?php endif; ?>><?php echo $vo['content_name']; ?></option>
                                            <?php endforeach; endif; else: echo "" ;endif; endif; ?>
                                    </select>
                                </div>
                                <div class="form-group col-sm-12">
                                    <label><?php echo lang('XtPzBs'); ?></label>
                                    <input type="text" class="form-control" name="config_name" value="<?php echo $Info['config_name']; ?>" placeholder="<?php echo lang('XtPzBsWk'); ?><?php echo lang('XtPzBsAl'); ?>" />
                                </div>
                                <div class="form-group col-sm-12">
                                    <label><?php echo lang('XtPzMc'); ?></label>
                                    <input type="text" class="form-control" name="config_title" value="<?php echo $Info['config_title']; ?>" placeholder="<?php echo lang('XtPzMcWk'); ?>" />
                                </div>
                                <div class="form-group col-sm-12">
                                    <label><?php echo lang('XtPzLx'); ?></label>
                                    <select class="chosen-select chosen-transparent form-control" name="config_type" id="config_type">
                                        <option value="1" <?php if($Info['config_type'] == '1'): ?>selected<?php endif; ?>><?php echo lang('XtPzLx1'); ?></option>
                                        <option value="2" <?php if($Info['config_type'] == '2'): ?>selected<?php endif; ?>><?php echo lang('XtPzLx2'); ?></option>
                                        <option value="3" <?php if($Info['config_type'] == '3'): ?>selected<?php endif; ?>><?php echo lang('XtPzLx3'); ?></option>
                                    </select>
                                </div>
                                <div class="form-group col-sm-12" id="div_input">
                                    <label><?php echo lang('XtPzNr'); ?></label>
                                    <input type="text" class="form-control" name="config_value" value="<?php echo $Info['config_value']; ?>" id="config_input" placeholder="<?php echo lang('XtPzNrWk'); ?>" />
                                </div>
                                <div class="form-group col-sm-12" id="div_select" style="display:none">
                                    <label><?php echo lang('XtPzXl'); ?></label>
                                    <input type="text" class="form-control" name="config_select" value="<?php echo $Info['config_select']; ?>" id="config_select" placeholder="<?php echo lang('XtPzXlWk'); ?><?php echo lang('XtPzXlAl'); ?>" />
                                </div>
                                <div class="form-group col-sm-12" id="div_images" style="display:none">
                                    <label for="file"><?php echo lang('XtPzTp'); ?></label>
                                    <div class="input-group">
                                        <input type="text" class="form-control config_images" placeholder="<?php echo lang('XtPzTpWk'); ?>" readonly="readonly" style="background-color:rgba(0, 0, 0, 0.3);border: 0;color: rgba(255, 255, 255, 0.8);font-size: 12px;-webkit-font-smoothing: antialiased;line-height: 20px;" />
                                        <span class="input-group-btn">
                                            <span class="btn btn-<?php echo config('CNF_BTNCOLOR'); ?> btn-file">
                                                <i class="fa fa-upload"></i><input type="file" class="config_images" name="config_images" accept="image/jpeg,image/jpg,image/png" multiple="" />
                                            </span>
                                        </span>
                                    </div>
                                </div>
                                <div class="form-group col-sm-12">
                                    <label><?php echo lang('XtPzSm'); ?></label>
                                    <input type="text" class="form-control" name="config_remark" value="<?php echo $Info['config_remark']; ?>" placeholder="<?php echo lang('XtPzSmWk'); ?>" />
                                </div>
                                <div class="form-group col-sm-12">
                                    <label><?php echo lang('XtPzXs'); ?></label>
                                    <select class="chosen-select chosen-transparent form-control" name="config_show">
                                        <option value="2" <?php if($Info['config_show'] == '2'): ?>selected<?php endif; ?>><?php echo lang('XtPzXs2'); ?></option>
                                        <option value="1" <?php if($Info['config_show'] == '1'): ?>selected<?php endif; ?>><?php echo lang('XtPzXs1'); ?></option>
                                    </select>
                                </div>
                                <div class="form-group col-sm-12">
                                    <label><?php echo lang('XtPzPx'); ?></label>
                                    <input type="text" class="form-control" name="config_sort" value="<?php echo (isset($Info['config_sort']) && ($Info['config_sort'] !== '')?$Info['config_sort']:0); ?>" placeholder="<?php echo lang('XtPzPxWk'); ?><?php echo lang('XtPzPxAl'); ?>" />
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="tile-footer bg-transparent-black-2 rounded-bottom-corners">
                    <div class="row">
                        <div class="col-sm-12 text-center">
                            <button type="button" class="btn btn-<?php echo config('CNF_BTNCOLOR'); ?> ajax-post"><?php echo lang('Form_Submit'); ?></button>
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </div>
</div>

	        	</div>
	        </div>
	    </div>
		
    <script>
        $(document).on('change', '.btn-file :file',function(){
            var input = $(this),
            numFiles = input.get(0).files ? input.get(0).files.length : 1,
            label = input.val().replace(/\\/g, '/').replace(/.*\//, '');
            input.trigger('fileselect', [numFiles, label]);
        });

        $(function(){
            <?php if($Info['config_type'] == 1): ?>
                $('#div_input').show();
                $('#div_select,#div_images').hide();
            <?php elseif($Info['config_type'] == 2): ?>
                $('#div_input,#div_select').show();
                $('#div_images').hide();
            <?php elseif($Info['config_type'] == 3): ?>
                $('#div_images').show();
                $('#div_input,#div_select').hide();
            <?php endif; ?>

            $('#config_type').change(function(){
                $('#config_input,#config_select,.config_images').val('');
                var config_type = $('#config_type').val();
                if(config_type == 1){
                    $('#div_input').show();
                    $('#div_select,#div_images').hide();
                }else if(config_type == 2){
                    $('#div_input,#div_select').show();
                    $('#div_images').hide();
                }else if(config_type == 3){
                    $('#div_images').show();
                    $('#div_input,#div_select').hide();
                }
            });

            $('.btn-file :file').on('fileselect', function(event, numFiles, label){
                var input = $(this).parents('.input-group').find(':text'),
                log = numFiles > 1 ? numFiles + ' files selected' : label;
                console.log(log);
                if(input.length){
                    input.val(log);
                }else{
                    if(log)layer.msg(log);
                }
            });
        })
    </script>

	</body>
</html>